# Which compiler
# CC = gcc
# AR = ar
# AT = @

# source file
SRCS := ${wildcard *.c}
SRCS += linux/kv_adapter.c

OBJS = $(patsubst %.c,%.o,$(SRCS))

# Where are include files kept
INCLUDES := -I./
INCLUDES += -I./linux
INCLUDES += -I$(MIDDLEWARE_PATH)
INCLUDES += -I$(MIDDLEWARE_PATH)/dymem

# Option for development
CFLAGS = -g -Wall
# CXXFLAGS = 
# Option for release
# CFLAGS = -O -Wall

TARGET = libObjectModule.a


all: $(OBJS)
	$(AT)$(AR) rcs $(TARGET) $^
	$(AT)mv $(TARGET) $(LIBS_PATH)

$(OBJS):%.o:%.c
	$(AT)$(CC) $(CFLAGS) $(INCLUDES) -c $^ -o $@


.PHONY: clean
clean:
	$(AT)-rm -f $(OBJS)
